package com.dreamstations.changshads.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * Created by 7YHong on 2016/6/13.
 */
public class Article implements Serializable,Parcelable{
    String url, doc;

    public Article(String url, String doc) {
        this.url = url;
        this.doc = doc;
    }

    protected Article(Parcel in) {
        url = in.readString();
        doc = in.readString();
    }

    public static final Creator<Article> CREATOR = new Creator<Article>() {
        @Override
        public Article createFromParcel(Parcel in) {
            return new Article(in);
        }

        @Override
        public Article[] newArray(int size) {
            return new Article[size];
        }
    };

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDoc() {
        return doc;
    }

    public void setDoc(String doc) {
        this.doc = doc;
    }

    @Override
    public String toString() {
        return "Article{" +
                "url='" + url + '\'' +
                ", doc='" + doc + '\'' +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(url);
        dest.writeString(doc);
    }

}
